﻿using System;
using System.Collections.Generic;
using System.Text;
using AdaptiveAgents.Loggers;

namespace AdaptiveAgents.Agents
{
    /// <summary>
    /// The 'Builder' Abstract class - builds an instance of agent
    /// </summary>
    public abstract class AgentBuilder
    {
        protected Agent _agent; //The instance of the agent

        /// <summary>
        /// Gets the created agent
        /// </summary>
        /// <returns>The agent that was built</returns>
        public Agent getAgent()
        {
            return _agent;
        }

        /// <summary>
        /// Creates a new agent according the to builder type
        /// </summary>
        /// <param name="id">ID of the new agent</param>
        /// <param name="env">EnvironmentType that should contain the agent</param>
        /// <param name="eps">Exploration factor of the agent</param>
        /// <param name="logger">The output logger of the agent</param>
        public void create(int id, Environment env, double eps, Logger logger)
        {
            _agent = new Agent(id, env, eps, logger);
        }

        //Abstract build methods

        /// <summary>
        /// Assign a next player chooser module
        /// </summary>
        public abstract void buildNextPlayerDecision();

        /// <summary>
        /// Assign a next player predictor module
        /// </summary>
        public abstract void buildNextPlayerPrediction();
        
        /// <summary>
        /// Assign a memory to the agent
        /// </summary>
        public abstract void buildMemoryOfAgent();

        //public abstract void buildTeamMateModel();        
    }

}
